<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>hover+transition</title>
</head>
<body>
  <div class="container">
    <figure class="effect">
      <img src="../assets/20150601193904_7919.jpg" alt="">
      <figcaption>
        <h2>
          Passionate
          <span>Julia</span>
        </h2>
        <div>
          <p>Julia dances in the deep dark</p>
          <p>She loves the smell of the ocean</p>
          <p>And drives into the morning light</p>
        </div>
      </figcaption>
    </figure>
  </div>
  <span class="div-wrap">1111</span>
</body>
<style>
  .div-wrap {
    line-height: 50px;
  }
  .effect {
    max-width: 480px;
    min-width: 320px;
    max-height: 360px;
    width: 48%;
    height: auto;
    overflow: hidden;
    background: #2f3238;
    position: relative;
    cursor: pointer;
  }
  .effect img {
    width: 100%;
    height: 400px;
    opacity: .8;
    transition: .5s;
  }
  .effect:hover img {
    transform: scale(1.1);
    opacity: .4;
  }
  figcaption {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    color: #fff;
    padding: 2em;
    font-size: 1.25em;
  }
  figcaption h2 {
    margin: 0;
    padding: .5em 0;
    font-weight: 300;
    text-transform: uppercase;
  }
  .effect p {
    margin: 0 0 .25em;
    padding: .4em 1em;
    background: rgba(255, 255, 255, .9);
    display: inline-block;
    color: #2f3238;
    font-weight: 500;
    font-size: 75%;
    transform: translate(-360px, 0);
    transition: .5s;
  }
  /** 动画延时 */
  .effect p:nth-of-type(2) {
    transition-delay: .05s;
  }
  .effect p:nth-of-type(3) {
    transition-delay: .1s;
  }
  /** 鼠标移动事件恢复到原有位置 */
  .effect:hover p {
    transform: translate(0, 0)
  }
</style>
</html>